function mapButtons(buttons) {
  // 将数组转换为对象的属性名，值为true
  /* eg:
   ["btn.Trademark.add","btn.Trademark.update","btn.Trademark.remove"]
    =>
    {
        "btn.Trademark.add":true,
        "btn.Trademark.update":true,
        "btn.Trademark.remove":true
    }
   */
  let obj = {};
  buttons.forEach((key) => {
    obj[key] = true;
  });

  console.log(obj);
  return obj
}

export default mapButtons;
